#!/bin/bash

help() {
  echo "Usage:"
  echo "  zmicro plugin version <plugin_name>"
  echo ""
}

core() {
  if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
    help
    exit 0
  fi

  local plugin_name=$1
  if [ "$name" != "" ]; then
    log::error "plugin name is required"
    exit 1
  fi

  plugin::get_version $plugin_name
}

run() {
  core $@
}

run $@
